package com.cx.controller.back;

import com.cx.service.ArticleService;
import com.cx.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/back/article")
public class ArticleController {
    @Autowired
    private ArticleService articleService;

    @GetMapping("/all")
    public @ResponseBody R getAll() {
        return R.ok().put("data", articleService.getAll());
    }
}
